package BLL;

import DAL.StaffDAL;
import Entities.TblStaff;
import java.util.List;

public class StaffBLL {

    public StaffDAL dalObj;

    public boolean add(TblStaff obj) throws Exception {
        dalObj = new StaffDAL();
        return dalObj.add(obj);
    }

    public boolean update(TblStaff obj) throws Exception {
        dalObj = new StaffDAL();
        return dalObj.update(obj);
    }

    public boolean delete(TblStaff obj) throws Exception {
        dalObj = new StaffDAL();
        return dalObj.delete(obj);
    }

    public TblStaff getById(int id) throws Exception {
        dalObj = new StaffDAL();
        return dalObj.getById(id);
    }

    public List<TblStaff> getAll() throws Exception {
        dalObj = new StaffDAL();
        return dalObj.getAll();
    }    

    public TblStaff getStaffByUsername(String _Username){
        dalObj = new StaffDAL();
        return dalObj.getStaffByUsername(_Username);
    }
}
